package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VReporteSiniestropormes extends javax.swing.JFrame {
	private JScrollPane jScrollPane1;
	private JTable jTableSiniestro;
	private JComboBox CnbMes;
	private JButton btnReporte;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				VReporteSiniestropormes inst = new VReporteSiniestropormes();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public VReporteSiniestropormes() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				jScrollPane1 = new JScrollPane();
				getContentPane().add(jScrollPane1);
				jScrollPane1.setBounds(31, 27, 459, 257);
				{
					
					jTableSiniestro = new JTable();
					jScrollPane1.setViewportView(jTableSiniestro);
				
				}
			}
			{
				btnReporte = new JButton();
				getContentPane().add(btnReporte);
				btnReporte.setText("Generar Reporte");
				btnReporte.setBounds(258, 302, 99, 23);
			}
			{
				ComboBoxModel CnbMesModel = 
						new DefaultComboBoxModel(
								new String[] { "Enero", "Febrero","Marzo","Abril", "Mayo", "Junio","Julio","Agosto","Septiembre","Octubre","Nobiembre","Dicienbre"});
				CnbMes = new JComboBox();
				getContentPane().add(CnbMes);
				CnbMes.setModel(CnbMesModel);
				CnbMes.setBounds(144, 302, 79, 23);
			}
			pack();
			this.setSize(531, 389);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public void agregarListener (ActionListener actionListener){
		this.btnReporte.addActionListener(actionListener);
	}
	
	public void setListado(AbstractTableModel abstractTableModel){
		jTableSiniestro.setModel(abstractTableModel);
	}
}


